![]() |
GeMA
The GeMA main application
|
The model data object stores information about top-level model objects such as meshes, property sets, boundary conditions, discontinuity sets and spatial indices. It is represented in Lua by a single global variable named modelData.
Index:
modelData:mesh()modelData:boundaryCondition()modelData:contactBoundaryCondition()modelData:propertySet()modelData:discontinuitySet()modelData:spatialIndex()modelData:addNewEmptyMesh()modelData:addNewEmptyDiscSet()| modelData:mesh(meshName) | |
|---|---|
| Description: | Recovers a mesh object from the model given its name. |
| Parameters: | meshName - The mesh name (id). |
| Returns: | Returns a mesh object or nil if the name is unknown. |
Example:
| modelData:boundaryCondition(bcName) | |
|---|---|
| Description: | Recovers a boundary condition object from the model given its name. |
| Parameters: | bcName - The boundary condition name (id). |
| Returns: | Returns a boundary condition object or nil if the name is unknown. |
Example:
| modelData:contactBoundaryCondition(cbcName) | |
|---|---|
| Description: | Recovers a contact boundary condition object from the model given its name. |
| Parameters: | cbcName - The contact boundary condition name (id). |
| Returns: | Returns a contact boundary condition object or nil if the name is unknown. |
Example:
| modelData:propertySet(psName) | |
|---|---|
| Description: | Recovers a property set object from the model given its name. |
| Parameters: | psName - The property set name (id). |
| Returns: | Returns a property set object or nil if the name is unknown. |
Example:
| modelData:discontinuitySet(dsName) | |
|---|---|
| Description: | Recovers a discontinuity set object from the model given its name. |
| Parameters: | dsName - The discontinuity set name (id). |
| Returns: | Returns a discontinuity set object or nil if the name is unknown. |
Example:
| modelData:spatialIndex(indexName) | |
|---|---|
| Description: | Recovers a spatial index object from the model given its name. |
| Parameters: | indexName - The spatial index name (id). |
| Returns: | Returns a spatial index object or nil if the name is unknown. |
Example:
| modelData:addNewEmptyMesh(newMeshName, dim, unit, options, pluginType) | ||
|---|---|---|
| Description: | Adds a new, empty mesh to the model. Nodes and cells should be added later by calls to the appropriate node and cell adding functions: mesh:addNodes() and mesh:addCells(). | |
| Parameters: | newMeshName | The new mesh name (id). Must be unique. |
| dim | The desired mesh coordinate dimension. Usually 2 or 3. | |
| unit | The coordinate unit. | |
| options | An optional table with additional attributes that are sent to the mesh creation plugin to properly initialize the new mesh. Can be used to tweak the new mesh definition. When using the standard mesh plugin, enables setting mesh options such as the coordinate unit, ghost nodes support, etc. See the plugin documentation. Important: fields whose values are sub-tables are not supported at the moment. | |
| pluginType | The optional plugin type that will be used to create the new mesh. Default is "GemaMesh.elem". | |
| Returns: | Returns a new mesh object or nil if there was an error creating the mesh. | |
Example:
| modelData:addNewEmptyDiscSet(newDSname, description, mesh, spatiolIndex, options) | ||
|---|---|---|
| Description: | Adds a new, empty discontinuitySet to the model. Attributes, Properties and Geometry should be added later by calling the discontinuitySet method ds:setDiscontinuityData(). | |
| Parameters: | newDSName | The new discontinuity set name (id). Must be unique. |
| description | The discontinuitySet description. | |
| mesh | A string (mesh id) or mesh object where the discontinuities lie. | |
| spatialIndex | A string (spatialIndex id) or spatialIndex object to be used by 2D discontinuities. (Can be nil for 3D geometry) | |
| options | A table with options for the discontinuitySet. Accepts the same options as model reference discontinuitySet. | |
| Returns: | Returns a new discontinuitySet object or nil if there was an error creating the discontinuitySet. | |
Example: